home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / #CHAINS.422 next >
Text File  |  1993-02-10  |  5KB  |  138 lines

  1. SPV-012.MOD
  2. Papa Bear #1 @15061
  3. Sat Feb 06 22:38:17 1993
  4. 4Msg. Status:3▄ 1If you feel like replying...
  5. 3 ▀▀▀▀▀▀▀▀▀▀▀▀
  6.  
  7. ┌────────────────────────────────────────────────────────────────────────────┐
  8. │ Mod Name: SPV-012.MOD      Mod Authors: Papa Bear 1@5079 (WWIVnet)         │
  9. │ Difficulty: Pretty darn easy                      1@15061 (WWIVlink)       │
  10. │ WWIV Version: 4.21, 4.21a, 4.22                   1@5079 (IceNET           │
  11. │ Files Affected: XINIT,BBSUTL1,VARDEC  Date: February 6, 1993               │
  12. │ Description: Allow any number of chains (stock code is limited to 50)      │
  13. └────────────────────────────────────────────────────────────────────────────┘
  14.  
  15.   Long Description:
  16.  
  17.   Well, I had an urge on night, and I decided to add EVERY on-liner I
  18. had on my archive floppies to the BBS.  I already had 40 odd on-line
  19. when I decided to do this.
  20.   When I got to #50, I found that I couldn't add anymore, so I wrote
  21. this mod to allow for ANY number of chains.  At one time I was running
  22. 130 (until I found that some wouldn't run properly remotely <sigh>)
  23. chains.  Now I'm right at 85.
  24.   A note here.  Just like 4.22 will allow up to 999 subboards and
  25. message bases, you can have 999 chains.  But, just as Wayne suggests,
  26. only define as many as you need.  Each chain defined takes up memory.
  27. So keep it close to what you have (in other words, don't define 999
  28. chains if you are only gonna run 60.  Instead, define maybe 70 [to
  29. give you some leeway]).
  30.  
  31. LEGEND:
  32. == unchanged, search for
  33. += modify line
  34. -- delete line
  35. ++ add line
  36.  
  37. -------
  38. STEP 0:  Backup yer source.  You installed it, yer responsible.
  39.  
  40. -------
  41. STEP 1:  Open XINIT.C and change the following lines
  42.  
  43. ==  num_dirs=(read(i,directories, (max_dirs*sizeof(directoryrec))))/
  44. ==           sizeof(directoryrec);
  45. ==  close(i);
  46. ==
  47. =+  chains=(chainfilerec *) mallocx(MAX_CHAINS * sizeof(chainfilerec), "chains"
  48. );
  49. ==  numextrn=0;
  50. ==  numchain=0;
  51. ==  numed=0;
  52. ==  sprintf(s,"%sCHAINS.DAT",syscfg.datadir);
  53. ==  i=open(s,O_RDWR | O_BINARY);
  54. ==  if (i>0) {
  55. =+    numchain=(read(i,(void *)chains, MAX_CHAINS*sizeof(chainfilerec)))/sizeof
  56. (chainfilerec);
  57. ==    numchain=numchain;
  58. ==    close(i);
  59. ==  }
  60.  
  61.   (Change the 50 in those to lines to MAX_CHAINS.)
  62.  
  63. -------
  64. STEP 2:  Open BBSUTL1.C and change the line
  65.  
  66. ==void do_chains(void)
  67. =={
  68. =+  int map[MAX_CHAINS],mapp,i,i1,ok,done;  /* change 50 to MAX_CHAINS */
  69. ==  char s[81],s1[81],*ss;
  70. ==  chainfilerec c;
  71.  
  72. -------
  73. STEP 3:  Still in BBSUTL1.C, you *may* want to change these lines
  74.  
  75. ==  show_chains(&mapp,map);
  76. ==  done=0;
  77. ==  do {
  78. ==    prt(2,get_string(621));
  79. =+    mpl(3);                /* NOTE 1 */
  80. --    ss=mmkey(0);           /* NOTE 2 */
  81. ++    input(ss,3);           /* NOTE 3 */
  82. ==    i=atoi(ss);
  83. ==    if ((i>0) && (i<=mapp)) {
  84. ==      done=1;
  85. ==      run_chain(map[i-1]);
  86.  
  87. NOTES:
  88. -----
  89. NOTE 1 - If running more than 99 chains change the 2 to a 3 in the
  90. mpl(2); statement.  *This mpl(2); may note be there.*  I have a habit
  91. of adding mpl's before all my input and mmkey lines.  If it is not in
  92. yours, ignore this.  (Or add it, it'll work.)
  93.  
  94. NOTE 2 - Again, if more than 99 chains, this has got to go.  Otherwise
  95. you'll never be able to run any chain over 99.
  96.  
  97. NOTE 3 - Here's the line if using more than 99 chains.  Effectively
  98. replaces the mmkey line above it.  You'll now have to press enter to
  99. execute any chain.  (Where mmkey would do it for you in certain
  100. circumstances.)
  101.  
  102. -------
  103. STEP 4:  Open VARDEC.H and add this line
  104.  
  105. == #define max_buf 1024
  106. == #define MSG_COLOR 0
  107. == #define MAX_FILES 61
  108. == #define MAX_BATCH 50
  109. ++ #define MAX_CHAINS 96        /* NOTE */
  110. ==
  111. == #define INT_REAL_DOS 0x21
  112.  
  113. NOTE - this is where you specify the number of chains you want.  You
  114. can increase or decrease this as needed (although you'll suffer
  115. through a complete recompile each time you do).  Remember, in the
  116. interests of saving memory, keep this resonably close to the number of
  117. chains you actually plan on having.  I have it set to 86, and I run 85
  118. chains.  You do not have to do this in 32 chain increments like the
  119. subboards and directories. You can put 90 if you wanted, but I would
  120. stick to a 32 chain increment (32,64,96,128, etc.) just in case.
  121.  
  122. -------
  123. STEP 5:  Do a complete recompile.
  124.  
  125.  
  126.   I've been using this mod for over a month now with ZERO problems.
  127. I wated to release it to see if Wayne changed the way the chains were
  128. handled, and he didn't.  So this will definitely work on 4.21, 4.21a,
  129. 4.22 and even possibly for versions before those.
  130.  
  131.   As always, if you use this I'd like to hear from you.  If you are
  132. having problems, I'll give you all the help I can.
  133.  
  134. 1-7=3*6>2Papa ßear6<3*7=1-0
  135. 3WWIVnet 55079 3WWIVlink 515050 3IceNET 55079 3BAIEnet 550500
  136. ---
  137. 5This tagline will self extract in 5 seconds.
  138.